home *** CD-ROM | disk | FTP | other *** search
- /*------------------------------------------------------------------------------
- File: DataTransferExt.cpp
-
- Contains: Data Transfer Extension class implementation
-
- Written by: Andrey Dolgachev, Sue Dumont
-
- Copyright: © 1995 by Apple Computer, Inc., all rights reserved.
- ------------------------------------------------------------------------------*/
-
- // -- Compiler/Preprocessor Notification --
-
- #ifndef _COMPILERDEFS_
- #include "CompDefs.h"
- #endif
-
- // -- OpenDoc Utilities --
-
- #ifndef _EXCEPT_
- // Exceptions define several important macros (ie. CHECKENV)
- // which are used in the SOM method dispatch glue. If Except.h
- // is not included early enough, exceptions may not be thrown
- // correctly when returning from a SOM method with "ev" parameter set.
- #include <Except.h>
- #endif
-
- // Notification that this is a SOM source file
- #define SampleCode_DataTransferExt_Class_Source
-
-
- // define underscore field names (ie. _fSelf)
- #define VARIABLE_MACROS
-
- // -- DataTransferExt Includes --
-
- #ifndef SOM_SampleCode_DataTransferExt_xih
- #include "DataTransferExt.xih"
- #endif
-
- // -- OpenDoc Includes --
-
- #ifndef _ODTYPES_
- #include <ODTypes.h>
- #endif
-
- #ifndef SOM_ODExtension_xh
- #include <Extensn.xh>
- #endif
-
-
- // -- OpenDoc Utilities --
-
- #ifndef _ODMEMORY_
- #include <ODMemory.h>
- #endif
-
- #ifndef _BARRAY_
- #include <BArray.h>
- #endif
-
- #ifndef _ODUTILS_
- #include <ODUtils.h>
- #endif
-
- //#ifndef _TEMPOBJ_
- //#include <TempObj.h>
- //#endif
-
-
- #pragma segment DataTransferExt
-
-
- //------------------------------------------------------------------------------
- // Method: Release
- // Origin: ODRefCountedObject
- //
- // Description: The Release method decrements an object’s reference count
- // by 1, and tells the draft to release the object from
- // memory if the ref count falls to 0. The parent class
- // must be called at the beginning of this method.
- //------------------------------------------------------------------------------
- SOM_Scope void
- SOMLINK DataTransferExt__Release
- (
- SampleCode_DataTransferExt* somSelf,
- Environment* ev
- )
- {
- SampleCode_DataTransferExtMethodDebug("DataTransferExt","Release");
-
- SampleCode_DataTransferExt_parent_ODExtension_Release(somSelf, ev);
- }
-
- //------------------------------------------------------------------------------
- // Method: InitDataTransferExt
- // Origin: DataTransferExt
- //
- // Description:
- //------------------------------------------------------------------------------
- SOM_Scope void
- SOMLINK DataTransferExt__InitDataTransferExt
- (
- SampleCode_DataTransferExt* somSelf,
- Environment* ev,
- ODPart* owner
- )
- {
- SampleCode_DataTransferExtMethodDebug("DataTransferExt","InitDataTransferExt");
-
- somSelf->InitExtension(ev, owner);
- }
-
- //------------------------------------------------------------------------------
- // Method: GetData
- // Origin: DataTransferExt
- //
- // Description: This method is called by the client part to obtain data from
- // the extension owner.
- //------------------------------------------------------------------------------
- SOM_Scope ODBoolean
- SOMLINK DataTransferExt__GetData
- (
- SampleCode_DataTransferExt* somSelf,
- Environment* ev,
- ODPlatformType type,
- ODByteArray* data
- )
- {
- SampleCode_DataTransferExtMethodDebug("DataTransferExt","GetData");
-
- return kODFalse;
- }
-
- //------------------------------------------------------------------------------
- // Method: SetData
- // Origin: DataTransferExt
- //
- // Description: This method retrieves the data from the ODByteArray and
- // passes it through to the subclass.
- //------------------------------------------------------------------------------
- SOM_Scope ODBoolean
- SOMLINK DataTransferExt__SetData
- (
- SampleCode_DataTransferExt* somSelf,
- Environment* ev,
- ODPlatformType type,
- ODByteArray* data
- )
- {
- SampleCode_DataTransferExtMethodDebug("DataTransferExt","SetData");
-
- return kODFalse;
- }
-